/**
 * Created by sunhao on 2015/5/19.
 */
//日历插件初始化
$(document).ready(function(){
  $('#calendar,#calendar_startDate,#calendar_startDate1,#calendar_endDate,#calendar_endDate1').datepicker({
    autoclose: true,
    beforeShowDay: $.noop,
    calendarWeeks: false,
    clearBtn: false,
    daysOfWeekDisabled: [],
    endDate: Infinity,
    forceParse: true,
    format: 'yyyy/mm/dd',
    keyboardNavigation: true,
    language: 'cn',
    minViewMode: 0,
    orientation: "auto",
    rtl: false,
    startDate: -Infinity,
    startView: 0,
    todayBtn: false,
    todayHighlight: false,
    weekStart: 0
  });
  //验证起始日期和截至日期
  $('#calendar_endDate,#calendar_endDate1').change(function(){
    var startDate=$('#calendar_startDate').val();
    var endDate=$('#calendar_endDate').val();
    if(startDate > endDate){
      window.alert("起始日期不能早于截至日期")
    }
  })


});

